var day2020 = [
    [
        "2020-01-17",
        15.384615384615385
    ],
    [
        "2020-01-16",
        7.6923076923076925
    ],
    [
        "2020-01-12",
        7.6923076923076925
    ],
    [
        "2020-01-07",
        7.6923076923076925
    ],
    [
        "2020-01-06",
        7.6923076923076925
    ],
    [
        "2020-01-03",
        15.384615384615385
    ],
    [
        "2020-05-14",
        15.384615384615385
    ],
    [
        "2020-03-13",
        23.076923076923077
    ],
    [
        "2020-03-06",
        15.384615384615385
    ],
    [
        "2020-06-10",
        23.076923076923077
    ],
    [
        "2020-05-07",
        30.76923076923077
    ],
    [
        "2020-05-06",
        30.76923076923077
    ],
    [
        "2020-04-04",
        7.6923076923076925
    ],
    [
        "2020-03-12",
        46.15384615384615
    ],
    [
        "2020-03-11",
        15.384615384615385
    ],
    [
        "2020-03-10",
        23.076923076923077
    ],
    [
        "2020-05-09",
        23.076923076923077
    ],
    [
        "2020-03-19",
        23.076923076923077
    ],
    [
        "2020-09-15",
        23.076923076923077
    ],
    [
        "2020-09-14",
        46.15384615384615
    ],
    [
        "2020-09-04",
        23.076923076923077
    ],
    [
        "2020-08-20",
        15.384615384615385
    ],
    [
        "2020-08-19",
        15.384615384615385
    ],
    [
        "2020-08-18",
        30.76923076923077
    ],
    [
        "2020-08-17",
        38.46153846153847
    ],
    [
        "2020-08-14",
        15.384615384615385
    ],
    [
        "2020-08-13",
        30.76923076923077
    ],
    [
        "2020-05-20",
        7.6923076923076925
    ],
    [
        "2020-09-09",
        23.076923076923077
    ],
    [
        "2020-04-13",
        23.076923076923077
    ],
    [
        "2020-03-29",
        7.6923076923076925
    ],
    [
        "2020-03-28",
        53.84615384615385
    ],
    [
        "2020-03-05",
        38.46153846153847
    ],
    [
        "2020-03-04",
        7.6923076923076925
    ],
    [
        "2020-12-14",
        23.076923076923077
    ],
    [
        "2020-07-09",
        23.076923076923077
    ],
    [
        "2020-07-08",
        23.076923076923077
    ],
    [
        "2020-07-07",
        7.6923076923076925
    ],
    [
        "2020-07-06",
        23.076923076923077
    ],
    [
        "2020-07-03",
        23.076923076923077
    ],
    [
        "2020-07-02",
        23.076923076923077
    ],
    [
        "2020-06-30",
        7.6923076923076925
    ],
    [
        "2020-06-24",
        23.076923076923077
    ],
    [
        "2020-06-23",
        46.15384615384615
    ],
    [
        "2020-06-22",
        61.53846153846154
    ],
    [
        "2020-05-24",
        7.6923076923076925
    ],
    [
        "2020-05-19",
        23.076923076923077
    ],
    [
        "2020-05-18",
        100.0
    ],
    [
        "2020-12-30",
        7.6923076923076925
    ],
    [
        "2020-12-28",
        7.6923076923076925
    ],
    [
        "2020-12-25",
        30.76923076923077
    ],
    [
        "2020-12-20",
        7.6923076923076925
    ],
    [
        "2020-12-18",
        7.6923076923076925
    ],
    [
        "2020-12-17",
        23.076923076923077
    ],
    [
        "2020-12-12",
        46.15384615384615
    ],
    [
        "2020-12-11",
        15.384615384615385
    ],
    [
        "2020-12-10",
        23.076923076923077
    ],
    [
        "2020-12-09",
        30.76923076923077
    ],
    [
        "2020-12-04",
        30.76923076923077
    ],
    [
        "2020-12-02",
        23.076923076923077
    ],
    [
        "2020-12-01",
        38.46153846153847
    ],
    [
        "2020-11-30",
        30.76923076923077
    ],
    [
        "2020-11-29",
        7.6923076923076925
    ],
    [
        "2020-11-28",
        46.15384615384615
    ],
    [
        "2020-11-27",
        7.6923076923076925
    ],
    [
        "2020-06-04",
        30.76923076923077
    ],
    [
        "2020-03-31",
        30.76923076923077
    ],
    [
        "2020-03-30",
        53.84615384615385
    ],
    [
        "2020-05-12",
        23.076923076923077
    ],
    [
        "2020-04-23",
        15.384615384615385
    ],
    [
        "2020-04-02",
        46.15384615384615
    ],
    [
        "2020-04-01",
        15.384615384615385
    ],
    [
        "2020-03-14",
        15.384615384615385
    ],
    [
        "2020-09-02",
        23.076923076923077
    ],
    [
        "2020-03-24",
        15.384615384615385
    ],
    [
        "2020-03-23",
        7.6923076923076925
    ],
    [
        "2020-03-16",
        23.076923076923077
    ],
    [
        "2020-08-28",
        53.84615384615385
    ],
    [
        "2020-08-26",
        23.076923076923077
    ],
    [
        "2020-08-25",
        7.6923076923076925
    ],
    [
        "2020-08-24",
        23.076923076923077
    ],
    [
        "2020-07-01",
        15.384615384615385
    ],
    [
        "2020-03-09",
        46.15384615384615
    ],
    [
        "2020-04-26",
        15.384615384615385
    ],
    [
        "2020-04-15",
        53.84615384615385
    ],
    [
        "2020-06-28",
        7.6923076923076925
    ],
    [
        "2020-06-08",
        7.6923076923076925
    ],
    [
        "2020-06-03",
        15.384615384615385
    ],
    [
        "2020-06-02",
        15.384615384615385
    ],
    [
        "2020-05-22",
        23.076923076923077
    ],
    [
        "2020-05-21",
        7.6923076923076925
    ],
    [
        "2020-05-17",
        30.76923076923077
    ],
    [
        "2020-05-16",
        15.384615384615385
    ],
    [
        "2020-05-15",
        23.076923076923077
    ],
    [
        "2020-05-13",
        15.384615384615385
    ],
    [
        "2020-05-11",
        7.6923076923076925
    ],
    [
        "2020-05-08",
        7.6923076923076925
    ],
    [
        "2020-04-10",
        7.6923076923076925
    ],
    [
        "2020-04-14",
        15.384615384615385
    ],
    [
        "2020-11-23",
        7.6923076923076925
    ],
    [
        "2020-11-20",
        7.6923076923076925
    ],
    [
        "2020-11-17",
        30.76923076923077
    ],
    [
        "2020-11-16",
        15.384615384615385
    ],
    [
        "2020-09-10",
        46.15384615384615
    ],
    [
        "2020-08-03",
        7.6923076923076925
    ],
    [
        "2020-07-24",
        7.6923076923076925
    ],
    [
        "2020-07-23",
        15.384615384615385
    ],
    [
        "2020-04-28",
        30.76923076923077
    ],
    [
        "2020-04-21",
        23.076923076923077
    ],
    [
        "2020-04-20",
        15.384615384615385
    ],
    [
        "2020-04-17",
        23.076923076923077
    ],
    [
        "2020-04-16",
        53.84615384615385
    ],
    [
        "2020-04-09",
        23.076923076923077
    ],
    [
        "2020-04-07",
        30.76923076923077
    ],
    [
        "2020-04-03",
        7.6923076923076925
    ],
    [
        "2020-03-27",
        15.384615384615385
    ],
    [
        "2020-09-08",
        30.76923076923077
    ],
    [
        "2020-07-28",
        7.6923076923076925
    ],
    [
        "2020-04-29",
        23.076923076923077
    ],
    [
        "2020-04-22",
        30.76923076923077
    ],
    [
        "2020-07-20",
        15.384615384615385
    ],
    [
        "2020-07-17",
        30.76923076923077
    ],
    [
        "2020-07-16",
        7.6923076923076925
    ],
    [
        "2020-07-15",
        38.46153846153847
    ],
    [
        "2020-07-14",
        15.384615384615385
    ],
    [
        "2020-07-13",
        23.076923076923077
    ],
    [
        "2020-09-11",
        23.076923076923077
    ],
    [
        "2020-09-07",
        15.384615384615385
    ],
    [
        "2020-09-06",
        7.6923076923076925
    ],
    [
        "2020-09-05",
        23.076923076923077
    ],
    [
        "2020-09-03",
        7.6923076923076925
    ],
    [
        "2020-09-01",
        15.384615384615385
    ],
    [
        "2020-08-23",
        7.6923076923076925
    ],
    [
        "2020-08-21",
        7.6923076923076925
    ],
    [
        "2020-08-11",
        7.6923076923076925
    ],
    [
        "2020-09-16",
        30.76923076923077
    ],
    [
        "2020-09-22",
        23.076923076923077
    ],
    [
        "2020-09-21",
        15.384615384615385
    ],
    [
        "2020-08-27",
        15.384615384615385
    ],
    [
        "2020-08-12",
        7.6923076923076925
    ],
    [
        "2020-08-07",
        30.76923076923077
    ],
    [
        "2020-08-06",
        7.6923076923076925
    ],
    [
        "2020-08-05",
        7.6923076923076925
    ],
    [
        "2020-08-10",
        7.6923076923076925
    ],
    [
        "2020-06-20",
        30.76923076923077
    ],
    [
        "2020-05-29",
        7.6923076923076925
    ],
    [
        "2020-03-25",
        7.6923076923076925
    ],
    [
        "2020-12-27",
        15.384615384615385
    ],
    [
        "2020-12-07",
        7.6923076923076925
    ],
    [
        "2020-11-26",
        7.6923076923076925
    ],
    [
        "2020-11-25",
        15.384615384615385
    ],
    [
        "2020-11-24",
        23.076923076923077
    ],
    [
        "2020-11-18",
        15.384615384615385
    ],
    [
        "2020-11-06",
        23.076923076923077
    ],
    [
        "2020-11-02",
        15.384615384615385
    ],
    [
        "2020-09-30",
        7.6923076923076925
    ],
    [
        "2020-09-25",
        7.6923076923076925
    ],
    [
        "2020-09-24",
        15.384615384615385
    ],
    [
        "2020-09-23",
        7.6923076923076925
    ],
    [
        "2020-03-20",
        7.6923076923076925
    ],
    [
        "2020-12-19",
        15.384615384615385
    ],
    [
        "2020-11-19",
        15.384615384615385
    ],
    [
        "2020-10-30",
        23.076923076923077
    ],
    [
        "2020-10-13",
        7.6923076923076925
    ],
    [
        "2020-10-12",
        30.76923076923077
    ],
    [
        "2020-10-10",
        15.384615384615385
    ],
    [
        "2020-10-09",
        7.6923076923076925
    ],
    [
        "2020-06-19",
        30.76923076923077
    ],
    [
        "2020-06-18",
        38.46153846153847
    ],
    [
        "2020-06-17",
        30.76923076923077
    ],
    [
        "2020-06-16",
        30.76923076923077
    ],
    [
        "2020-06-15",
        38.46153846153847
    ],
    [
        "2020-06-14",
        23.076923076923077
    ],
    [
        "2020-06-13",
        7.6923076923076925
    ],
    [
        "2020-06-12",
        38.46153846153847
    ],
    [
        "2020-06-11",
        15.384615384615385
    ],
    [
        "2020-06-09",
        15.384615384615385
    ],
    [
        "2020-06-01",
        15.384615384615385
    ],
    [
        "2020-05-28",
        15.384615384615385
    ],
    [
        "2020-05-27",
        15.384615384615385
    ],
    [
        "2020-05-26",
        15.384615384615385
    ],
    [
        "2020-05-25",
        7.6923076923076925
    ]
];


var dat2020option = {
    backgroundColor: '#404a59',

    title: {
        top: 30,
        text: '2020年commit分布图',
        left: 'center',
        textStyle: {
            color: '#fff'
        }
    },
    tooltip: {
        trigger: 'item'
    },
    legend: {
        top: '30',
        left: '100',
        data: ['次数比例', 'Top 12'],
        textStyle: {
            color: '#fff'
        }
    },
    calendar: [{
        top: 100,
        left: 'center',
        range: ['2020-01-01', '2020-06-30'],
        splitLine: {
            show: true,
            lineStyle: {
                color: '#000',
                width: 4,
                type: 'solid'
            }
        },
        yearLabel: {
            formatter: '{start}  1st',
            textStyle: {
                color: '#fff'
            }
        },
        itemStyle: {
            color: '#323c48',
            borderWidth: 1,
            borderColor: '#111'
        }
    }, {
        top: 340,
        left: 'center',
        range: ['2020-07-01', '2020-12-31'],
        splitLine: {
            show: true,
            lineStyle: {
                color: '#000',
                width: 4,
                type: 'solid'
            }
        },
        yearLabel: {
            formatter: '{start}  2nd',
            textStyle: {
                color: '#fff'
            }
        },
        itemStyle: {
            color: '#323c48',
            borderWidth: 1,
            borderColor: '#111'
        }
    }],
    series: [{
            name: '次数比例',
            type: 'scatter',
            coordinateSystem: 'calendar',
            data: day2020,
            symbolSize: function(val) {
                return val[1] / 4;
            },
            itemStyle: {
                color: '#ddb926'
            }
        },
        {
            name: '次数比例',
            type: 'scatter',
            coordinateSystem: 'calendar',
            calendarIndex: 1,
            data: day2020,
            symbolSize: function(val) {
                return val[1] / 4;
            },
            itemStyle: {
                color: '#ddb926'
            }
        },
        {
            name: 'Top 12',
            type: 'effectScatter',
            coordinateSystem: 'calendar',
            calendarIndex: 1,
            data: day2020.sort(function(a, b) {
                return b[1] - a[1];
            }).slice(0, 12),
            symbolSize: function(val) {
                return val[1] / 4;
            },
            showEffectOn: 'render',
            rippleEffect: {
                brushType: 'stroke'
            },
            hoverAnimation: true,
            itemStyle: {
                color: '#f4e925',
                shadowBlur: 10,
                shadowColor: '#333'
            },
            zlevel: 1
        },
        {
            name: 'Top 12',
            type: 'effectScatter',
            coordinateSystem: 'calendar',
            data: day2020.sort(function(a, b) {
                return b[1] - a[1];
            }).slice(0, 12),
            symbolSize: function(val) {
                return val[1] / 4;
            },
            showEffectOn: 'render',
            rippleEffect: {
                brushType: 'stroke'
            },
            hoverAnimation: true,
            itemStyle: {
                color: '#f4e925',
                shadowBlur: 10,
                shadowColor: '#333'
            },
            zlevel: 1
        }
    ]
};



var chartDom = document.getElementById('2020day');
var myChart = echarts.init(chartDom, 'dark');
dat2020option && myChart.setOption(dat2020option);